/* GUI CONVERTED from ictriq1.i (converter v1.75) Tue Sep 19 10:49:51 2000 */
/* ictriq1.i - TRANSACTION INQUIRY (Subroutine to display transaction)       */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                       */
/* All rights reserved worldwide.  This is an unpublished work.              */
/*F0PN*/ /*V8:ConvertMode=Report                                             */
/* REVISION: 7.0      LAST MODIFIED: 03/30/92   by: jms *F335*               */
/* REVISION: 7.0      LAST MODIFIED: 04/08/92   by: dld *F358*               */
/* REVISION: 7.0      LAST MODIFIED: 07/16/92   by: pma *F773*               */
/* REVISION: 7.0      LAST MODIFIED: 09/26/94   by: ljm *GM54*               */
/* REVISION: 8.5      LAST MODIFIED: 01/21/95   by: taf *J035*               */
/* REVISION: 7.2      LAST MODIFIED: 03/20/95   by: qzl *F0NK*               */
/* REVISION: 7.3      LAST MODIFIED: 03/31/95   by: jpm *G0K2*               */
/* REVISION: 8.5      LAST MODIFIED: 08/22/95   by: srk *J06Y*               */
/* REVISION: 7.3      LAST MODIFIED: 10/11/95   by: jzs *G0S6*               */
/* REVISION: 8.5      LAST MODIFIED: 06/25/96   by: ame *J0W8*               */
/* REVISION: 8.6      LAST MODIFIED: 10/04/96   BY: *K003* Steve Goeke       */
/* REVISION: 8.6      LAST MODIFIED: 01/15/97   BY: *J1FH* Maryjeane Date    */
/* REVISION: 8.6      LAST MODIFIED: 03/15/97   BY: *K04X* Steve Goeke       */
/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 05/28/98   BY: *J2N4* Dana Tunstall     */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan        */
/* REVISION: 9.1      LAST MODIFIED: 10/01/99   BY: *N014* Jeff Wootton      */
/* REVISION: 9.1      LAST MODIFIED: 10/25/99   BY: *N002* Steve Nugent      */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 05/12/00   BY: *N09X* Antony Babu      */
/* REVISION: 9.1      LAST MODIFIED: 08/13/00   BY: *N0KS* myb               */
/* REVISION: 9.1      LAST MODIFIED: 09/18/00   BY: *N0S3* Dave Caveney      */

/* REVISION: 9.1      LAST MODIFIED: 08/08/26   BY: *fdn*  Donny fu     */


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

               desc1 = "".
               desc2 = "".
               name = "".
               trtime = string(tr_time,"HH:MM").

/*N09X**  -------------- BEGIN - COMMENT ----------------------------
* /* ********** Begin Translatable Strings Definitions ********* */
*
* &SCOPED-DEFINE ictriq1_i_1 " Cost Data "
* /* MaxLen: Comment: */
*
* /* ********** End Translatable Strings Definitions ********* */
**N09X**  -------------- END - COMMENT ----------------------------*/

               find pt_mstr where pt_part = tr_part no-lock no-wait no-error.
               if available pt_mstr then do:
                  desc1 = pt_desc1.
                  desc2 = pt_desc2.
               end.
               find ad_mstr where ad_addr = tr_addr no-lock no-wait no-error.
               if available ad_mstr then name = ad_name.
               tot_std_cost = tr_mtl_std + tr_lbr_std +
                              tr_bdn_std + tr_ovh_std + tr_sub_std.

/*N0S3*        /* SET EXTERNAL LABELS */ */
/*N0S3*        setFrameLabels(frame b:handle). */
               display tr_trnbr tr_nbr
/*F358*/               tr_ord_rev
                       tr_lot tr_type tr_part tr_date desc1
                       trtime tr_um tr_effdate tr_addr tr_rmks name tr_userid
                       tr_so_job tr_program tr_ship_type tr_curr /*fdn* tr_price */
                       tr_qty_chg
/*K04X*/               tr_ship_id tr_ship_inv_mov tr_ship_date
               with frame b STREAM-IO /*GUI*/ .

/*F773*/       if yn then do:
/*J06Y*/          hide frame b no-pause.
/*N0S3*           /* SET EXTERNAL LABELS */ */
/*N0S3*           setFrameLabels(frame b1:handle). */
                  display tr_site tr_begin_qoh tr_loc tr_qty_chg tr_serial
                          tr_qty_short tr_status tr_loc_begin tr_vend_lot
                          tr_qty_loc tr_grade tr_expire
/*J035*/                  tr_ref
/*J035*/                  tr_batch
/*GM54*           with frame a. */
/*GM54*/          with frame b1 STREAM-IO /*GUI*/ .
/*GM54 F192       if tr_assay <> 0 then display tr_assay with frame a. */
/*GM54*/          if tr_assay <> 0 then display tr_assay with frame b1 STREAM-IO /*GUI*/ .
/*GM54 F192        else display "" @ tr_assay with frame a. */
/*GM54*/          else display "" @ tr_assay with frame b1 STREAM-IO /*GUI*/ .
/*F773*/       end.

/*GM54* F335       hide frame a /*no-pause*/ . */

               FORM /*GUI*/ 
/*N014*        BEGIN DELETE
 *K003*           /* Changed all "colon 15" fields on this form to "colon 16" */
 *G0K2*           tr_mtl_std    colon 16 /*V8! skip(1) */
 *G0K2*           tr_lbr_std    colon 16 /*V8! skip(1) */
 *G0K2*           tr_bdn_std    colon 16 /*V8! skip(1) */
 *G0K2*           tr_ovh_std    colon 16 /*V8! skip(1) */
 *G0K2*           tr_sub_std    colon 16 /*V8! skip(1) */
 *G0K2*           tot_std_cost  colon 16 /*V8! skip(1) */
 *G0S6*        with frame c side-labels width 40
 *G0S6**       with frame c side-labels width 39 *
 *N014*        END DELETE */
/*N014*/          tr_mtl_std    colon 24
/*N014*/          tr_ovh_std    colon 59
/*N014*/          tr_lbr_std    colon 24
/*N014*/          tr_sub_std    colon 59
/*N014*/          tr_bdn_std    colon 24
/*N014*/          tot_std_cost  colon 59
/*N014*/       with STREAM-IO /*GUI*/  frame c side-labels width 80
/*N09X** /*G0S6*/  title color normal (getFrameTitle("COST_DATA",15)). */
/*N09X*/ /*G0S6*/  title color normal (getFrameTitle("COST_DATA",20)).

/*G0S6*               title color normal " COST DATA ".*/
/*G0K2*/ /* /*GM54*/ /*V8! font 0 */ */ .

               /* SET EXTERNAL LABELS */
               setFrameLabels(frame c:handle).
               
               VIEW FRAME c.
               /*fdn* display  tr_mtl_std tr_lbr_std tr_bdn_std tr_ovh_std tr_sub_std 
               tot_std_cost with frame c STREAM-IO /*GUI*/ . *fdn*/ 

               for each trgl_det where trgl_trnbr = tr_trnbr no-lock
               use-index trgl_nbr_ref with frame d down:
/*J1FH*/         typetitle = " " + trgl_type + " ".
                 FORM /*GUI*/ 
/*N014*         BEGIN DELETE
 *G0K2*           trgl_dr_acct   colon 15 trgl_dr_cc  no-label /*V8! skip(1)
 */
 *G0K2*           trgl_cr_acct   colon 15 trgl_cr_cc  no-label /*V8! skip(1) */
 *G0K2*           trgl_dr_proj   colon 15                      /*V8! skip(1) */
 *G0K2*           trgl_cr_proj   colon 15                      /*V8! skip(1) */
 *G0K2*           trgl_gl_ref    colon 15                      /*V8! skip(1) */
 *G0K2*           trgl_gl_amt    colon 15                      /*V8! skip(1) */
 *G0S6*          with frame d side-labels width 40 column 41
 *N014*         END DELETE */
/*N014*           BEGIN RESEQUENCED AND ADDED TO FORM */
                  trgl_dr_acct   colon 13
                  trgl_dr_sub    no-label
                  trgl_dr_cc     no-label
                  trgl_dr_proj   no-label
                  trgl_cr_acct   colon 13
                  trgl_cr_sub    no-label
                  trgl_cr_cc     no-label
                  trgl_cr_proj   no-label
                  trgl_gl_amt    colon 13
                  trgl_gl_ref    colon 60
                 with STREAM-IO /*GUI*/  frame d side-labels width 80
/*N014*           END RESEQUENCED AND ADDED TO FORM */
/*J2N4*/     1 down
/*G0S6*/         title color normal typetitle.

               /* SET EXTERNAL LABELS */
               setFrameLabels(frame d:handle).

/*G0S6*                   with frame d side-labels width 39 1 down column 42 */
/*G0S6*            title color normal " " + trgl_type + " ". */
/*F0NK*           title color normal trgl_type  */
/*G0K2*/ /* /*GM54*/ /*V8! font 0 */ */ .

/*N014*           display trgl_dr_acct trgl_cr_acct trgl_dr_cc trgl_cr_cc */
/*N014*                   trgl_dr_proj trgl_cr_proj trgl_gl_ref trgl_gl_amt. */
/*N014*           BEGIN RESEQUENCED AND ADDED TO DISPLAY */
                  display
                     trgl_dr_acct
                     trgl_dr_sub
                     trgl_dr_cc
                     trgl_dr_proj
                     trgl_cr_acct
                     trgl_cr_sub
                     trgl_cr_cc
                     trgl_cr_proj
                     /*fdn* trgl_gl_amt */
                     trgl_gl_ref WITH STREAM-IO /*GUI*/ .
/*N014*           END RESEQUENCED AND ADDED TO DISPLAY */

                   hide frame d.
               end.

/*N002*/    if is_wiplottrace_enabled() then do:
/*N002*/       {gprunmo.i
                  &program=""ictriqa.p""
                  &module="AWT"
                  &param="""(input recid(tr_hist))"""}
/*N002*/    end.

/*J0W8*/       /* THE HIDE FRAME C WITH A PAUSE IS NEEDED, OTHERWISE THE  */
               /* FRAME WILL NOT BE SEEN IF THERE ARE NO TRGL_DET RECORDS */
/*J0W8*/       hide frame c.
/*J06Y*        hide frame c. */
/*J06Y*/       hide frame b1 no-pause.
/*J0W8* /*J06Y*/       hide frame c no-pause.*/
/*J0W8* /*J06Y*/       hide frame d no-pause.*/
